package com.clqteam.daoimpl;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;


import com.clqteam.dao.InsertComboLXGDao;
import com.clqteam.model.Employee;
import com.clqteam.model.Supplier;
import com.clqteam.util.JDBCutil;
/**
 * 供应商增加功能下拉列表的dao
 * @author Administrator LXG
 *
 */
public class InsertComboLXGDaoImpl implements InsertComboLXGDao{

	@Override
	public List<Employee> selectEid() {
		List <Employee>li=new ArrayList();
		StringBuffer sql=new StringBuffer("");
		sql.append(" SELECT s_employee.eId,s_employee.eName");
		sql.append(" FROM s_employee");
		
		Connection con=JDBCutil.getConnection();
		try {
			PreparedStatement ps=con.prepareStatement(sql.toString());			
			
			ResultSet rs=ps.executeQuery();
			while(rs.next()){
				Employee e=new Employee();
				e.seteId(rs.getInt("eId"));
				e.seteName(rs.getString("eName"));
				li.add(e);
			}
			
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return li;
	}

}
